package com.lry.service;

import com.lry.core.RpcCallback;
import com.lry.entity.AppendEntriesRequest;
import com.lry.entity.AppendEntriesResponse;
import com.lry.entity.VoteRequest;
import com.lry.entity.VoteResponse;

import java.util.concurrent.Future;

public interface RaftConsensusServiceAsync extends RaftConsensusService {

    Future<VoteResponse> requestVote(VoteRequest voteRequest, RpcCallback<VoteResponse> responseRpcCallback);

    Future<AppendEntriesResponse> appendEntries(AppendEntriesRequest appendEntriesRequest,RpcCallback<AppendEntriesResponse> responseRpcCallback);

    Future<AppendEntriesResponse> get(AppendEntriesRequest appendEntriesRequest,RpcCallback<AppendEntriesResponse> rpcCallback);

}
